﻿<MVVMBase:WindowExtenBase x:Class="EzDesk.DesktopClient.PopupModule.View.PopupView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:MVVMBase="clr-namespace:EzDesk.MVVMBase;assembly=EzDesk.MVVMBase"                 
        AllowsTransparency="True"
        WindowStyle="None" 
        Background="Transparent"
        HorizontalAlignment="Right"
        VerticalAlignment="Bottom"
        WindowStartupLocation="Manual"

        Title="NotificationView" Height="144"  Width="288">
    <MVVMBase:WindowExtenBase.Resources>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></BooleanToVisibilityConverter>
    </MVVMBase:WindowExtenBase.Resources>
    <Border  x:Name="LayoutRoot"  CornerRadius="5"  BorderThickness="1" BorderBrush="{DynamicResource BackGreen}" Background="{DynamicResource BackGreen}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <DockPanel x:Name="TitlePanel" HorizontalAlignment="Stretch" Grid.Row="0" Margin="5,1" LastChildFill="False">
                <ContentControl Content="{Binding Path=CurrentFeedViewModel.ContentTitle, Converter={StaticResource XamlConverter}}"  Hyperlink.RequestNavigate="ContentControl_RequestNavigate"/>
                <Button x:Name="CloseBtn" DockPanel.Dock="Right" Margin="1" Style="{StaticResource CloseButtonStyle}" Click="CloseBtn_Click" VerticalAlignment="Top"  Width="16" Height="16"></Button>
            </DockPanel>
            <Grid x:Name="BodyPanel" Grid.Row="1" Background="White">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="40"/>
                    <ColumnDefinition Width="0.826*"/>
                    <ColumnDefinition Width="15"/>
                </Grid.ColumnDefinitions>

                <StackPanel HorizontalAlignment="Left" Margin="3,3,0,0" VerticalAlignment="Top"  Grid.Column="1">
                    <Border BorderThickness="1">
                        <Image  Width="25" Height="25" Source="{Binding Path=CurrentFeedViewModel.IconUrl,Converter={StaticResource ImageCacherConverter}}"/>
                    </Border>
                    <ToggleButton Content="ToggleButton" HorizontalAlignment="Center" Margin="0,3,0,0" Style="{DynamicResource StarToggleButton}" Width="15" Height="15"  IsChecked="{Binding IsMark}"/>
                </StackPanel>

                <StackPanel Margin="0,3" Grid.Column="2">
                    <ContentControl x:Name="BodyContent" Content="{Binding CurrentFeedViewModel.ContentBody, Converter={StaticResource XamlConverter}}"  Hyperlink.RequestNavigate="ContentControl_RequestNavigate"/>
                    <TextBlock Foreground="#FF666666" Text="{Binding CurrentFeedViewModel.LastUpdate, Converter={StaticResource DatetimeConverter}}"/>
                </StackPanel>
                <Image Grid.ColumnSpan="4" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="60" Margin="0,0,-10,-10"  Source="{StaticResource LogoGreen}"  Opacity="0.3" Panel.ZIndex="-1" ></Image>
            </Grid>
            <StackPanel Grid.Row="1" Margin="10 10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <Button Command="{Binding PrevFeedCommand}" Margin="0 0 5 0" Width="12" Height="14" Style="{DynamicResource MovePrevBtnStyle}"></Button>
                <TextBlock Text="{Binding SelectedIndex}" />
                <TextBlock Text=" / " />
                <TextBlock Text="{Binding Count}" />
                <Button Command="{Binding NextFeedCommand}" Margin="5 0 0 0" Width="12" Height="14" Style="{DynamicResource MoveNextBtnStyle}"></Button>
            </StackPanel>
        </Grid>
    </Border>
</MVVMBase:WindowExtenBase>
